package com.eliza.music

import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.view.WindowInsets
import android.view.WindowManager
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import com.eliza.music.activity.BVideoActivity
import com.eliza.music.activity.MusicActivity

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
            WindowInsets.Type.statusBars()
        }

        setContent {
            Column {
                Button(onClick = {
                    startActivity(
                        Intent(this@MainActivity, MusicActivity::class.java)
                    )
                }) {
                    Text(text = "MusicActivity")
                }
                Button(onClick = {
                    startActivity(
                        Intent(this@MainActivity, BVideoActivity::class.java)
                    )
                }) {
                    Text(text = "BilibiliActivity")
                }
            }
        }
    }
}

